﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <link type="text/css" href="~/lib/YdmJUI/static/public/css/font.css" rel="stylesheet" />
    <link type="text/css" href="~/lib/YdmJUI/static/public/css/main.css" rel="stylesheet" />
    <!-- 主页内容样式 -->
    <link href="~/lib/YdmJUI/topjui/css/homecontent.css" rel="stylesheet" />
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="~/lib/YdmJUI/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <!-- layui框架样式 -->
    <link type="text/css" href="~/lib/YdmJUI/static/plugins/layui/css/layui.css" rel="stylesheet" />
    <link href="~/lib/jquery-loadmask/jquery.loadmask.min.css" rel="stylesheet" />
    <link type="text/css" href="~/lib/YdmJUI/topjui/themes/default/topjui.deepblue.css" rel="stylesheet" id="dynamicTheme" asp-append-version="true" />

    @{ await Html.RenderPartialAsync("~/Views/Partial/CommonJs.cshtml"); }

    <style>
        body {
            margin: 10px;
        }

        blockquote p {
            padding: 5px;
        }

        .layui-table {
            margin-top: 0 !important;
        }

        .layui-elem-quote {
            margin-bottom: 0 !important;
        }

        .layui-table {
            margin-top: 0;
            border-left: 5px solid #e2e2e2 !important;
        }

        .title .icon-new1 {
            margin-left: 10px;
            color: #f00;
        }
    </style>
</head>

<body>
    <div class="layui-container-fluid" id="Divhome" :style="{ height: bodyHeight + 'px' }" v-cloak>
        <div class="layui-row home_content">
            <div class="layui-col-xs8 home_content_left">
                <div class="layui-tab layui-tab-brief" lay-filter="tabChange" style="margin:0">
                    <ul class="layui-tab-title">
                        <li class="layui-this">@L("常用模块")</li>
                        <li>@L("外部站点")</li>
                    </ul>
                    <div class="layui-tab-content">
                        <div class="layui-tab-item layui-show">
                            <div class="insider_link">
                                <div class="layui-form-item" style="margin-right:0">
                                    <div class="layui-input-inline" style="width:100%">
                                        <input type="text" name="title" v-model="searchInsiderLinks" required lay-verify="required" placeholder="@L("请输入模块名称查询")" autocomplete="off" class="layui-input" id="linksWeb" style="margin-bottom: 10px">
                                    </div>
                                </div>
                                <div class="insider_link_info">
                                    <div class="addMenu" v-on:click="openInsiderPopup('addInsiderLinks')">
                                        <i class="layui-icon layui-icon layui-icon-add-1 addIcon"></i>
                                    </div>
                                    <div>
                                        <ul class="insider_link_info_list">
                                            <li v-for="item in searchInsiderInfos" v-dragging="{ list: UserInsiderLinksInfo, item: item ,group: 'item'}" :key="item.id" v-on:click="openInsiderLinks(item)">
                                                <a>
                                                    <div class="insider_link_info_list_img">
                                                        <span :class="['iconPic',item.userFunctionSetSiteIcon]"></span>
                                                        <div class="user_handle">
                                                            <span class="layui-icon layui-icon-edit" v-on:click.stop="editInsiderLink(item,'editInsiderLinkItem')"></span>
                                                            <span class="layui-icon layui-icon-delete" v-on:click.stop="deleInsiderLink(item,'deleInsiderLinkItem')"></span>
                                                        </div>
                                                    </div>
                                                    <div class="insider_link_info_list_title">
                                                        {{$.dm.L(item.userFunctionSetName)}}
                                                    </div>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-tab-item">
                            <div class="insider_link">
                                <div class="layui-form-item" style="margin-right:0">
                                    <div class="layui-input-inline" style="width:100%">
                                        <input type="text" name="title" v-model="searchOutsiderLinks" required lay-verify="required" placeholder="@L("请输入外部站点名称查询")" autocomplete="off" class="layui-input" id="linksWeb" style="margin-bottom: 10px">
                                    </div>
                                </div>
                                <div class="insider_link_info">
                                    <div class="addMenu" v-on:click="openOutsiderPopup('','addOutsiderLinks')">
                                        <i class="layui-icon layui-icon layui-icon-add-1 addIcon"></i>
                                    </div>
                                    <div>
                                        <ul class="insider_link_info_list">
                                            <li v-for="items in searchOutsiderInfos" v-dragging="{ list: UserOutsiderLinksInfo, item: items ,group: 'items' }" :key="items.id" v-on:click="openOutsiderLinks(items)">
                                                <a>
                                                    <div class="insider_link_info_list_img">
                                                        <img :src="items.userFunctionSetSiteIcon" />
                                                        <div class="user_handle1">
                                                            <span class="layui-icon layui-icon-edit" v-on:click.stop="editOutsiderLink(items,'editOutsiderLinks')"></span>
                                                            <span class="layui-icon layui-icon-delete" v-on:click.stop="deleOutsiderLink(items)"></span>
                                                        </div>
                                                    </div>
                                                    <div class="insider_link_info_list_title">
                                                        {{$.dm.L(items.userFunctionSetName)}}
                                                    </div>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs4 home_content_right">
                <div class="home_content_right_cell">
                    <div class="layui-row">
                        <div class="layui-col-xs12 layui-col-md12 forms">
                            <div class="layui-card">
                                <div class="layui-card-header">
                                    <span>@L("内部公告") </span>
                                    <span>@L("设置")</span>
                                </div>
                                <div class="layui-card-body">
                                    @*内容*@
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-xs12 layui-col-md12 message">
                            <div class="layui-card">
                                <div class="layui-card-header">
                                    <span>@L("最新消息")</span>
                                    <span>@L("更多消息")</span>
                                </div>
                                <div class="layui-card-body">
                                    @*内容*@
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 选择内部链接 -->
        <div class="layui-row" id="insiderLinks" style="display:none;">
            <div class="commonuse_title">
                <div v-for="items in  selectedItemInfo">
                    <div class="title_item" :data-id="items.id">
                        <span class="commonuse_item_text">{{$.dm.L(items.functionName)}}</span>
                        <p class="commonuse_icon" v-on:click="deleteFunction(items)">
                            <span class="title_item_icon layui-icon layui-icon-close delete_icon"></span>
                            <span class="title_item_icon layui-icon layui-icon-close-fill"></span>
                        </p>
                    </div>
                </div>
            </div>
            <div class="commonuse_main">
                <div class="common_main_title">
                    <div class="common_main_title_select">
                        <select name="titleName" lay-verify="required" v-model="selectedTitleID">
                            >
                            <option v-for="item in  InsiderInfoAllModuleName" :value="item.id">{{$.dm.L(item.applicationName)}}</option>
                        </select>
                    </div>
                    <div class="common_main_title_select">
                        <select name="titleName" lay-verify="required" v-model="selectModuleId">
                            >
                            <option v-for="item in  seelctModules" :value="item.moduleGUID">{{$.dm.L(item.moduleName)}}</option>
                        </select>
                    </div>
                    <div class="common_main_title_search">
                        <span class="layui-icon layui-icon-search icon_search"></span>
                        <input type="text" placeholder="输入内部链接" id="keywords" v-model="searchSelectedTitleItem">
                    </div>
                </div>
                <div class="commonuse_main_content">
                    <div class="commonuse_main_content_Info" v-if="selectedTitleInfo.length>=0">
                        <div class="commonuse_main_content_list" v-for="item in  selectedTitleInfo">
                            <div class="commonuse_main_content_item_title">
                                <span class="layui-badge-dot"></span>
                                <span class="commonuse_main_content_item_title_text">{{$.dm.L(item.functionName)}}</span>
                            </div>
                            <div class="commonuse_main_content_list_item" v-for="items in  item.myChildFuntion">
                                <div :class='["addIcon",items.isChoose==0?"show":"hide"]' :data-id="items.id" v-on:click="childFunctionClick(items)">
                                    <span class="layui-icon layui-icon-add-1"></span>
                                    <span class="item_text">{{$.dm.L(items.functionName)}}</span>
                                </div>
                                <div :class='["selectedIcon",items.isChoose==1?"show":"hide"]' :data-id="items.id" v-on:click="childFunctionClick(items)">
                                    <span class="layui-icon layui-icon-ok"></span>
                                    <i class="item_text grayColor" style="font-style:normal">{{$.dm.L(items.functionName)}}</i>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="commonuse_main_content_Info" v-else>
                        <div class="commonuse_main_content_list" v-for="item in  InsiderInfoAllModuleContent">
                            <div class="commonuse_main_content_item_title">
                                <span class="layui-badge-dot"></span>
                                <span class="commonuse_main_content_item_title_text">{{$.dm.L(item.functionName)}}</span>
                            </div>
                            <div class="commonuse_main_content_list_item" v-for="items in  item.myChildFuntion" v-on:click="childFunctionClick(items)">
                                <div :class='["addIcon",items.isChoose==0?"show":"hide"]' :data-id="items.id">
                                    <span class="layui-icon layui-icon-add-1 "></span>
                                    <span class="item_text">{{$.dm.L(items.functionName)}}</span>
                                </div>
                                <div :class='["selectedIcon",items.isChoose==1?"show":"hide"]' :data-id="items.id" v-on:click="childFunctionClick(items)">
                                    <span class="layui-icon layui-icon-ok"></span>
                                    <i class="item_text grayColor" style="font-style:normal">{{$.dm.L(items.functionName)}}</i>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item popu_bottom">
                <div class="layui-input-block" style="text-align:center; margin-left:0">
                    <button class="layui-btn" id="saveInsiderLinksInfo" type="button" lay-filter="demo1" v-on:click="saveSelectedInsideLinks">@L("保存")</button>
                    <button type="reset" class="layui-btn layui-btn-primary" v-on:click="closeSelectedInsideLinks">@L("关闭")</button>
                </div>
            </div>
        </div>

        <!-- 选择外部链接 -->
        <div class="layui-row" id="outLinks" style="display:none;">
            <form class="layui-form" action="">
                <div class="commonuse_Info">
                    <div class="layui-form-item">
                        <label class="layui-form-label" for="linksName">@L("站点名称")</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" v-model="linksInfo.userFunctionSetName" required lay-verify="required" placeholder="请输入站点名称 例如:百度" autocomplete="off" class="layui-input" id="linksName">
                        </div>
                    </div>
                    <div :class='["layui-form-item",currentIndex==0?"hide":"show"]'>
                        <label class="layui-form-label" for="linksWeb">@L("站点网址")</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" v-if="currentIndex ==0" v-model="linksInfo.userFunctionSetUrl" v-bind:disabled="isCanHandle" required lay-verify="required" placeholder="请输入站点网址 例如:fa fa-calendar" autocomplete="off" class="layui-input" id="linksWeb">
                            <input type="text" name="title" v-else v-model="linksInfo.userFunctionSetUrl" required lay-verify="required" placeholder="请输入站点网址 例如:https://www.baidu.com" autocomplete="off" class="layui-input" id="linksWeb">
                        </div>
                    </div>
                    <div class="layui-form-item" v-show="currentIndex ==1" id="changeRadio">
                        <label class="layui-form-label">@L("是否在浏览器打开")</label>
                        <div class="layui-input-block">
                            <input type="radio" name="BroswerOpen" id="insider" value="1" title="@L("是")" lay-filter="radioItem">
                            <input type="radio" name="BroswerOpen" id="out" value="0" title="@L("否")" lay-filter="radioItem" checked="checked">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block" style="text-align:center; margin-left:10px">
                        <button class="layui-btn" id="saveLinksInfo" type="button" lay-filter="demo1" v-on:click="saveLinksInfo">@L("保存")</button>
                        <button type="reset" class="layui-btn layui-btn-primary" v-on:click="closeLinksInfo">@L("关闭")</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <!--IM引入-->
    @*<script src="/layim/js/init.js"></script>*@
    <script src="~/lib/vue/vue.min.js"></script>
    <script src="~/lib/dragging/vue-dragging.es5.js"></script>
    <script src="~/js/views/Main/Home/SystemIndex.js" asp-append-version="true"></script>
</body>
</html>